﻿using System;
using System.Collections.Generic;

namespace PageAdmin.Utils
{
    /// <summary>
    /// 树形级联选项描述类
    /// </summary>
    [Serializable]
    public class TreeOptionsItem
    {
        /// <summary>
        /// 选项值，一般和数据库的主键Id对应
        /// </summary>
        public virtual int value { get; set; }

        /// <summary>
        /// 选项名称
        /// </summary>
        public virtual string label { get; set; }

        /// <summary>
        /// 父级Value，一般和数据库的ParentId对应
        /// </summary>
        public virtual int parentValue { get; set; } = 0;

        /// <summary>
        /// 是否禁用
        /// </summary>
        public virtual bool disabled { get; set; } = false;

        /// <summary>
        /// 子节点
        /// </summary>
        public virtual IEnumerable<TreeOptionsItem> children { get; set; } = null;

    }
}
